<?php
require_once("../php/connection.php");

$res = mysql_query("SELECT * FROM site_user_meta");
echo mysql_numrows($res).'<br><br>';

while($row = mysql_fetch_array($res))
{
	echo '<a href="http://facebook.com/'.$row['fbid'].'" target="_blank"><img src="http://graph.facebook.com/'.$row['fbid'].'/picture" /></a>';
	
	$fbid = $row['fbid'];
	$res1 = mysql_query("SELECT * FROM site_user_login WHERE `fbid`='$fbid' ORDER BY `time` DESC");
	$time = mysql_result($res1, 0, 'time');
	date_default_timezone_set('Asia/Calcutta');
	echo date("Y-m-d H:i:s",$time).'<br><br>';
	
}

?>